Import libraries for data handling and visualization


In [1]:
import numpy as np
from pandas import Series,DataFrame
import pandas as pd
import csv

In [2]:
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline


:0: FutureWarning: IPython widgets are experimental and may change in the future.

In [ ]:
import os
os.chdir('C:\Users\Micah\Desktop\Georgetown\WMATA Project\Final Output\Final')

Silver Line Visualization


In [23]:
silver = pd.read_csv('silver_total1.csv')

In [24]:
fig = sns.FacetGrid(silver, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = silver['end'].max()
fig.set(xlim=(9450,biggest))
fig.add_legend()
sns.plt.title('Silver Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [25]:
ax = sns.violinplot(x="group", y="end", data=silver)
sns.plt.title('Silver Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Orange Line Visualization


In [29]:
orange = pd.read_csv('orange_total1.csv')

In [53]:
fig = sns.FacetGrid(orange, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = orange['end'].max()
fig.set(xlim=(7695,biggest))
fig.add_legend()
sns.plt.title('Orange Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [31]:
ax = sns.violinplot(x="group", y="end", data=orange)
sns.plt.title('Orange Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Blue Line Visualization


In [49]:
blue = pd.read_csv('blue_total1.csv')

In [54]:
fig = sns.FacetGrid(blue, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = blue['end'].max()
fig.set(xlim=(6400,biggest))
fig.add_legend()
sns.plt.title('Blue Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [55]:
ax = sns.violinplot(x="group", y="end", data=blue)
sns.plt.title('Blue Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Red Line Visualization


In [56]:
red = pd.read_csv('red_total1.csv')

In [57]:
fig = sns.FacetGrid(red, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = red['end'].max()
fig.set(xlim=(10720,biggest))
fig.add_legend()
sns.plt.title('Red Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [58]:
ax = sns.violinplot(x="group", y="end", data=red)
sns.plt.title('Red Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Green Line Visualization


In [4]:
green = pd.read_csv('green_total1.csv')

In [5]:
fig = sns.FacetGrid(green, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = green['end'].max()
fig.set(xlim=(6435,biggest))
fig.add_legend()
sns.plt.title('Green Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [6]:
ax = sns.violinplot(x="group", y="end", data=green)
sns.plt.title('Green Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Yellow Line Visualization


In [7]:
yellow = pd.read_csv('yellow_total1.csv')

In [8]:
fig = sns.FacetGrid(yellow, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = yellow['end'].max()
fig.set(xlim=(4860,biggest))
fig.add_legend()
sns.plt.title('Yellow Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [9]:
ax = sns.violinplot(x="group", y="end", data=yellow)
sns.plt.title('Yellow Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Additional Red Line Visualization


In [10]:
red1 = pd.read_csv('red_total2.csv')

In [12]:
fig = sns.FacetGrid(red1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = red1['end'].max()
fig.set(xlim=(10720,biggest))
fig.add_legend()
sns.plt.title('Additional Red Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [28]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=red1, aspect=10)
sns.plt.title('Additional Red Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Additional Orange Line Visualization


In [4]:
orange1 = pd.read_csv('orange_total2.csv')

In [5]:
fig = sns.FacetGrid(orange1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = orange1['end'].max()
fig.set(xlim=(7695,biggest))
fig.add_legend()
sns.plt.title('Additional Orange Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [6]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=orange1, aspect=10)
sns.plt.title('Additional Orange Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Additional Silver Line Visualization


In [7]:
silver1 = pd.read_csv('silver_total2.csv')

In [8]:
fig = sns.FacetGrid(silver1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = silver1['end'].max()
fig.set(xlim=(9450,biggest))
fig.add_legend()
sns.plt.title('Additional Silver Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [9]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=silver1, aspect=10)
sns.plt.title('Additional Silver Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Additional Blue Line Visualization


In [10]:
blue1 = pd.read_csv('blue_total2.csv')

In [11]:
fig = sns.FacetGrid(blue1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = blue1['end'].max()
fig.set(xlim=(6400,biggest))
fig.add_legend()
sns.plt.title('Additional Blue Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [12]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=blue1, aspect=10)
sns.plt.title('Additional Blue Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')



In [ ]:
#Additional Green Line Visualization

In [13]:
green1 = pd.read_csv('green_total3.csv')

In [14]:
fig = sns.FacetGrid(green1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = green1['end'].max()
fig.set(xlim=(6345,biggest))
fig.add_legend()
sns.plt.title('Additional Green Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [15]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=green1, aspect=10)
sns.plt.title('Additional Green Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')


Additional Yellow Line Visualization


In [16]:
yellow1 = pd.read_csv('yellow_total2.csv')

In [17]:
fig = sns.FacetGrid(yellow1, hue= "group",aspect=2)
fig.map(sns.kdeplot,'end',shade= False)
biggest = yellow1['end'].max()
fig.set(xlim=(4860,biggest))
fig.add_legend()
sns.plt.title('Additional Yellow Line Simulation Results (Density)')
sns.axlabel(xlabel='Daily Time of Trips', ylabel='Density')



In [18]:
fig, ax = plt.subplots()
fig.set_size_inches(11.7, 8.27)
ax = sns.violinplot(x="group", y="end", data=yellow1, aspect=10)
sns.plt.title('Additional Yellow Line Simulation Results (Violin)')
sns.axlabel(xlabel='Scenario', ylabel='Daily Time of Trips')